home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0793july.archive
/
000038_crash!kirk.safb.af.mil!BWILLS_Mon, 19 Jul 93 21:54:48 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
3KB
Received: by bkhouse.cts.com (V1.16/Amiga)
id AA00000; Mon, 19 Jul 93 21:54:48 PST
Received: from kirk.safb.af.mil by crash.cts.com with smtp
(Smail3.1.28.1 #15) id m0oI7sm-0000pwC; Mon, 19 Jul 93 19:56 PDT
Message-Id: <m0oI7sm-0000pwC@crash.cts.com>
Date: 19 Jul 93 21:54:00 CST
From: "Barry D. Wills" <BWILLS@kirk.safb.af.mil>
To: "amigae" <amigae@bkhouse.cts.com>
Subject: re: Amos to E
/* In answer to Stephane's Amos2E questions. */
PROC main ()
DEF s [2] : STRING,
c = "A",
cChar = NIL : PTR TO CHAR,
iChar = NIL : PTR TO INT,
lChar = NIL : PTR TO LONG
/* >> In Amos: A$=INKEY$ is to get a keyboard character.
Unfortunately, Inp() *waits* for the RETURN key. If I have time maybe
I'll try to work up an IDCMP thang; don't know if that would be the
the best solution. Meanwhile maybe someone else can pull this one out
of the air.
*/
/* >> Month$=Str(12) converts 12 as a string. */
StringF (s, '\d', 12)
WriteF ('1) Month=\s\n', s)
/* >> ASCII$=Asc(a) converts a into an ASCII value. */
WriteF ('2) Asc(c)=\d\n', c)
/* >> A$=CHR$(27) convert a ASCII value into a character. */
WriteF ('3) CHR$(c)=\c\n', c)
/* Characters are similar to those in C. It's how you treat them that */
/* makes the difference. Note the following awesome feature: */
c := "FRED"
WriteF ('4a) 32-bit character! But be careful what you want:\n' +
' CHR$(c) = \c\n' +
' (no equiv)(c) = \d\n', c, c)
/* And lastly...a little of Wouter's polymorphism. */
cChar := iChar := lChar := 'FRED'
WriteF ('4b) What WriteF() thinks about 32-bit characters:\n' +
' cChar[]=\c\n' +
' iChar[]=\c\n' +
' lChar[]=\c\n',
cChar[], iChar[], lChar[])
WriteF (' What E really thinks about 32-bit characters:\n' +
' cChar[]=\s, Char(cChar)=\d[10], cChar[]=\d[10]\n' +
' iChar[]=\s, Int(iChar) =\d[10], iChar[]=\d[10]\n' +
' lChar[]=\s, Long(lChar)=\d[10], lChar[]=\d[10]\n',
IF cChar[] = "F" THEN 'F' ELSE '*', Char (cChar), cChar[],
IF iChar[] = "FR" THEN 'FR' ELSE '*', Int (iChar), iChar[],
IF lChar[] = "FRED" THEN 'FRED' ELSE '*', Long (lChar), lChar[])
/*=====
>from Amos<->E like he did with C<->E it would be very usefull. And I need the
>commands how to get or put values from gadtools gadgets.
Sorry, Stephane. KS1.3 is too dumb for gadtools :(
I got carried away, so you got more than you asked for. Hope I answered
your other questions thoroughly.
Later.
-- Barry
=====*/
ENDPROC